﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Freshbooks.XmlSerializers;

namespace Freshbooks.Model
{
    [FreshbooksSerialization(Name = "system")]
    public class FreshbooksSystem
    {
        [FreshbooksSerialization(Name = "company_name")]
        public string CompanyName { get; set; }

        [FreshbooksSerialization(Name = "profession")]
        public string Profession { get; set; }

        [FreshbooksSerialization(Name="address")]
        public CompanyAddress Address { get; set; }

        [FreshbooksSerialization(Name = "api")]
        public CompanyApi Api { get; set; }

        [FreshbooksSerialization(Name = "api")]
        public class CompanyApi
        {
            [FreshbooksSerialization(Name = "requests")]
            public int Requests { get; set; }

            [FreshbooksSerialization(Name = "request_limit")]
            public int RequestLimist { get; set; }
        }

        [FreshbooksSerialization(Name = "address")]
        public class CompanyAddress
        {
            [FreshbooksSerialization(Name = "street1")]
            public string Street1 { get; set; }

            [FreshbooksSerialization(Name = "street2")]
            public string Street2 { get; set; }

            [FreshbooksSerialization(Name = "city")]
            public string City { get; set; }

            [FreshbooksSerialization(Name = "province")]
            public string Province { get; set; }

            [FreshbooksSerialization(Name = "postal_code")]
            public string PostalCode { get; set; }

            [FreshbooksSerialization(Name = "country")]
            public string Country { get; set; }
        }
    }
}
